< previous page page_184 next page >

Page 184
Basic 5 form to lay out a data entry screen. Detail bands can have more than one physical line. However, detail bands describe only one logical record.
Crystal Reports Pro Fields
Within each band, you place fields to be displayed. Crystal Reports Pro recognizes three types of fields:
· Database fields
· Text fields
· Formula fields
Database fields are fields taken directly from data tables in the database you open when you first start Crystal Reports Pro. You can load any database format recognized by the Visual Basic 5 database object (for example, Microsoft Access, FoxPro, dBASE), including ODBC data sources. You add fields by selecting them from a list of available fields and placing them in the desired location on the report form.
Text fields are fields that contain explicit text you want to appear on the report form. This text is not stored in a data table. An example of a text field is Print Date. If you want this text to appear at the top of every page, you create a text field that contains it and then you place it in the header band.
Formula fields are fields that are calculated results of either database fields or text fields (or a combination of both). Crystal Reports Pro requires you to declare a formula field name and then allows you to use any existing text field, database field, or other formula field as part of the new formula field. Formula fields can be numeric or character based. For example, if you want to print the value Expiration Date: followed by the database field DataTable.Expire, but do not want to have to place two field objects in the detail band, you can create a single formula field, called ExpDate, that contains the following expression:
"Expiration Date: "+DataTable.Expire
Crystal Reports Pro has several predefined formula fields available, along with a host of functions and operators that you can use to construct complex formulas, including the use of nested If statements to test data.
In the following sections, you'll begin a report definition to illustrate how bands and fields are used in Crystal Reports Pro.

 
< previous page page_184 next page >

If you like this book, buy it!